<!DOCTYPE HTML>
<html>
<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible"
          content="IE=edge">
    <title>SUI Mobile Demo</title>
    <meta name="description"
          content="MSUI: Build mobile apps with simple HTML, CSS, and JS components.">
    <meta name="viewport"
          content="initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-capable"
          content="yes">
    <meta name="apple-mobile-web-app-status-bar-style"
          content="black">
    <meta name="format-detection"
          content="telephone=no">

    <meta name="referrer"
          content="never">

    <link rel="stylesheet"
          href="//g.alicdn.com/msui/sm/0.6.2/css/sm.min.css">
    <link rel="stylesheet"
          href="//g.alicdn.com/msui/sm/0.6.2/css/sm-extend.min.css">


    <script type='text/javascript'
            src='//g.alicdn.com/sj/lib/zepto/zepto.min.js'
            charset='utf-8'></script>
    <script type='text/javascript'
            src='//g.alicdn.com/msui/sm/0.6.2/js/sm.min.js'
            charset='utf-8'></script>
    <script type='text/javascript'
            src='//g.alicdn.com/msui/sm/0.6.2/js/sm-extend.min.js'
            charset='utf-8'></script>


    <link href="http://vjs.zencdn.net/6.2.4/video-js.css"
          rel="stylesheet">

    <!-- If you'd like to support IE8 -->
    <script src="http://vjs.zencdn.net/ie8/1.1.2/videojs-ie8.min.js"></script>

    <script src="http://vjs.zencdn.net/6.2.4/video.js"></script>

    <link href="http://vjs.zencdn.net/c/video-js.css" rel="stylesheet">
    <script src="http://vjs.zencdn.net/c/video.js"></script>
    <link rel="stylesheet" href="/js/dropload/dist/dropload.css" >
    <script type='text/javascript' src='/js/dropload/dist/dropload.js' charset='utf-8'></script>

    <style type="text/css">
        .video-js {
            width: 100%;
            height: 56.25%;
        }

        .movieName{
            display: -webkit-box;
            -webkit-box-orient: vertical;
            overflow: hidden;
            -webkit-line-clamp:1;
            text-align : left;
            padding-left: .05rem;
            font-size: .85rem;
            color: #ffffff;
        }
        .movieExplain{
            color: #008C9E;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            overflow: hidden;
            -webkit-line-clamp:1;
            font-size: .7rem;
            padding-left: .05rem;
            color: #4d5b72;
        }

        .plot .movieExplain{
            color: #008C9E;
            display: block;
            font-size: .7rem;
            padding-left: .05rem;
            color: #4d5b72;
        }
        .row {
            margin-top: 1rem;
            margin-bottom: .2rem;
        }

        .row .col-80 {
            width: 65%;
        }

        .row .col-20 {
            width: 25%;
            padding-top: 0.4rem;
        }

        .button-success.button-fill {
            background-color: #f9d13f;
            color: #1a1a1a;
            border-radius: 1rem;
            display: inline;
            padding: .4rem .8rem .3rem .8rem;
        }

        .cast {
            min-height: 1rem;
        }

        .divbuttom {
            margin-bottom: .4rem;
        }

        .castName {
            float: left;
            width: 14%;
            padding-left: .5rem;
            font-size: .75rem;
            color: #4d5b72;
        }

        .castContent {
            float: left;
            width: 81%;
            font-size: .75rem;
            color: #ffffff;
        }

        .scoreI {
            margin-left: .5rem;
            float: left;
            background-color: #1a1a1a;
            width: 19%;
        }

        .score {
            width: 100%;
            min-height: 2rem;
            table-layout: fixed;
            float: left;
            margin-top: .3rem;
            margin-bottom: .3rem;
        }

        .scoreNumber {
            margin-top: .1rem;
            display: block;
            text-align: center;
        }

        .scoreName {
            color: #4d5b72;
            text-align: center;
            display: block;
        }

        .scoreContent {
            table-layout: fixed;
            float: left;
            margin-left: 1.7rem;
            width: 10%;
            padding-top: .8rem;
            /*position: absolute;*/
        }

        .scoreContent i {
            background: url(/img/icon.png) no-repeat;
            display: inline;
            width: 20px;
            height: 20px;
            float: left;
        }

        .i1 {
            background-position: 0px 0px;
        }

        .i2 {
            background-position: 0px -22px;
        }

        .i3 {
            background-position: 0px -44px;
        }

        hr{
            margin: 0px;
            width: 100%;
            height: 8px;
            border: 0px;
            background-color: #181b20;
            border-top: #010101 1px;
            border-bottom: #010101 1px;
        }

        .plot {
            float: left;
            margin-left: 5px;
            margin-top: .6rem;
        }

        .like {
            margin-top: .5rem;
        }

        #category-head {
            width: 100%;
            display: inline;
            white-space: nowrap;
            overflow-x: scroll;
            float: left;
            overflow-y: hidden
        }

        #category-head li {
            display: inline-block;
            padding-left: .3rem;
        }

        .flex a {
            float: left;
            width: 5rem;
            color: #ffffff;
        }

        ul {
            -webkit-padding-start: 0px;
            -webkit-margin-before: 0em;
        }

        .movieImg2 {
            float: left;
            width: 100%;
        }

        .comment li {
            padding: .2rem 1rem;
            display: block;

        }

        .comment {
            width: 100%;
            clear: both;
            display: inline-block;
            margin-top: .5rem;
        }

        .commentlift img {
            border-radius: 1rem;
            width: 2rem;
        }

        commentright img {
            width: 1rem;
        }

        .commentlift {
            width: 2rem;
            float: left;
            padding-top: .5rem
        }


        .commentContent {
            margin-left: 3rem;
            margin-right: 2rem;
        }

        .commentContent span {
            color: #4d5b72;
        }

        .commentContent a {
            color: #008C9E;
        }

        .commentContent .time{
            color: #4d5b72;
        }
        .font_12 {
            font-size: .7rem;
        }

        .commenttest {
            color: #4d5b72;
        }

        .font_yellow {
            color: #f9d13f;
        }

        .padding_lift_5 {
            padding-left: 5px;
        }

        .search-input input {
            background-color: #181b20;
            border: 0px;
            border-radius: 25px;
            width: 100%;
            color: #dddddd;
        }

        .searchbar .col-80 {
            width: 70%;
        }

        .searchbar .col-20 {
            width: 20%;
            padding: 0;
        }

        .col-20 .button-success.button-fill {
            padding: .3rem .6rem .3rem .6rem;
        }
        .commentInput .row{
            margin-bottom: 0;
        }




    </style>

</head>
<body class="theme-dark">
<div class="page-group">
    <div id="page-swiper"
         class="page">
        <div class="content">

            <div class="video">
                <video id="my_video_1"
                       class="video-js vjs-default-skin vjs-vjs-16-9"
                       controls
                       autoplay="true"
                       preload="auto"
                       poster="${film.fPhotow}">
                    <source src="${videoVoucher}"
                            type="video/mp4">
                </video>
            </div>
            <div class="row padding_lift_5">
                <div class="col-80">
                     <span class="movieName padding_lift_5">
                                    ${film.fName}
                                </span>
                    <span class="movieExplain padding_lift_5">${film.fCountryname}-${film
                        .fYear?c}-${film.fFilmtypename}</span>

                </div>
                <div class="col-20">
                    <div><a href="/videoPlay?fid=${film.fId}"
                            class="button button-fill button-success">马上去看</a></div>
                </div>

            </div>
            <div class="cast">
                <span class="castName">导演:</span>
                <span class="castContent">${film.fDirector}</span>
            </div>
            <div class="cast divbuttom">
                <span class="castName">演员:</span>
                <span class="castContent">${film.fPerformer}</span>
            </div>
            <!--<div class="score divbuttom">-->
                <!--<div class="scoreI">-->
                    <!--<span class="scoreNumber">${film.fScore?string("#.##")}</span>-->
                    <!--<span class="scoreName">综合评分</span>-->

                <!--</div>-->

                <!--<div class="scoreContent">-->
                    <!--<i class="i1"></i>-->
                    <!--${videoscore.fDouban?string("0.##")!0.0}-->
                <!--</div>-->

                <!--<div class="scoreContent">-->
                    <!--<i class="i2"></i>-->
                    <!--${videoscore.fLanfanqie?string("0.##")!0.0}-->
                <!--</div>-->
                <!--<div class="scoreContent">-->
                    <!--<i class="i3"></i>-->
                    <!--${videoscore.fImdb?string("0.##")!0.0}-->
                <!--</div>-->
            <!--</div>-->
            <hr/>
            <div class="plot divbuttom">
                <span class="movieName padding_lift_5">剧情简介
                </span>
                <p class="movieExplain"
                   style="margin-left: 2px; margin-right: 2px;">${filminfo
                    .fIntroduce}</p>

            </div>
            <hr/>
            <div class="like">
                <span class="movieName padding_lift_5">
                                    猜你喜欢
                                </span>
                <ul class="flex-layout category-head"
                    id="category-head"
                    style="">
                    <!--内容填充-->
                </ul>

            </div>

            <hr/>

            <div class="comment">
                <div class=" font_yellow"
                     style="padding-left: .8rem;font-size: 1rem;">
                    评论(<span id="sp_commentct">0</span>)
                </div>
                <div>
                    <ul class="inner" id="ul_comment">

                    </ul>
                    <di id="div_commentfoot"></di>
                </div>
            </div>

                           <div class="commentInput">


                <div class="searchbar row" id="div_login">
                    <div class="search-input col-80">
                        <input type="search"
                               id='commentText'
                               style="width: 80%"
                               placeholder="我来说两句"
                               onfocus="aaa();"/>

                    </div>
                    <div class="col-20 " style="float: right">
                        <a href="#"
                           class="button button-fill button-success" onclick="AddConment()">确定</a>

                    </div>

                </div>
                <div class="searchbar row" id="div_nologin">
                    <div class=" col-80 pull-center">
                        <a href="/login"><b>登陆</b></a>可以添加评论
                    </div>
                </div>
            </div>


        </div>


    </div>
</div>


</body>

<script type='text/javascript' src='/js/mortise/comm.js' charset='utf-8'></script>
<script>
    if ('${loginstate}'=='login'){
        $('#div_login').show();
        $('#div_nologin').hide();
    }
    else{
        $('#div_login').hide();
        $('#div_nologin').show();
    }
    Zepto(function ($) {
        LoadGussYourLike();
      //  LoadComment();
    });
    function LoadGussYourLike() {

        var filtype = '${film.fFilmtype?string}';
        $.ajax({
            type: 'get',
            url: '/api/film/guessfilmlist?filmtype=' + filtype + '&count=4',
            dataType: 'json',
            success: function (data) {
                if (mortise_layout.ValidataResult(data)) {
                    //{"code":"OperateOk","errorMsg":"","result":{"list":[{"fId":"594cabc05bc42d07a0aa541a","fName":"一个钓鱼的故事","fFilmtype":"1000010100000000000","fYear":2016,"fCountry":12,"fKeyword":"一个钓鱼的故事","fPhoto":"http://119.10.70.142:9080/Images/upload/videoPhoto/595a87fe37ca1d108069af15.png","fPhotow":"http://101.201.122.79:8083/Images/upload/videoPhoto/596adca774c36b070e69ec8e.jpg","fDirector":"Matt Birman","fPerformer":"Eddie McClintock, Jayne Heitmeyer, Jordyn Negri ","fShowtime":"2016-12-12","fScore":0.0,"fPricetagid":"0","fPricetagname":"免费电影","fIntime":"2017-06-23 14:20:23","fShow":1,"fLookct":0,"fMakelookct":11,"fGoodct":0,"fMakegoodct":12,"fCollect":2,"fMakecollect":13,"fPlayct":132,"fMakepalyct":15,"fSharect":0,"fMakesharect":null,"fBuyct":0,"fCommentct":22,"fSourceurl":null,"fCountryname":"加拿大","fFilmtypename":"喜剧/剧情/奇幻","fImpression":"印象"},{"fId":"5930e4cd1c886e2dc0d45342","fName":"末世迷踪：下一代","fFilmtype":"0000000100000000000","fYear":2016,"fCountry":4,"fKeyword":"末世迷踪：下一代","fPhoto":"http://119.10.70.142:9080/Images/upload/videoPhoto/595a88f137ca1d108069af17.png","fPhotow":"http://101.201.122.79:8083/Images/upload/videoPhoto/596adcc774c36b070e69ec90.jpg","fDirector":"Larry A. McLean","fPerformer":" Amber Frank, Mason Dye, Dylan Sprayberry","fShowtime":"2017-06-02","fScore":0.0,"fPricetagid":"0","fPricetagname":"免费电影","fIntime":"2017-06-02 12:08:34","fShow":1,"fLookct":1,"fMakelookct":15,"fGoodct":2,"fMakegoodct":25,"fCollect":2,"fMakecollect":0,"fPlayct":17,"fMakepalyct":5,"fSharect":1,"fMakesharect":null,"fBuyct":0,"fCommentct":4,"fSourceurl":null,"fCountryname":"美国","fFilmtypename":"奇幻","fImpression":null},{"fId":"594c95065bc42d07a03f1fac","fName":"大婴儿","fFilmtype":"1100010000000000000","fYear":2015,"fCountry":4,"fKeyword":"大婴儿","fPhoto":"http://119.10.70.142:9080/Images/upload/videoPhoto/595a887337ca1d108069af16.png","fPhotow":"http://101.201.122.79:8083/Images/upload/videoPhoto/596adcb874c36b070e69ec8f.jpg","fDirector":"Stephen Langford","fPerformer":"Maureen McCormick, Andrew Lawrence, Ken Davitian","fShowtime":"2015-12-12","fScore":0.0,"fPricetagid":"1","fPricetagname":"2元电影","fIntime":"2017-06-23 12:43:35","fShow":1,"fLookct":0,"fMakelookct":11,"fGoodct":0,"fMakegoodct":12,"fCollect":1,"fMakecollect":13,"fPlayct":11,"fMakepalyct":15,"fSharect":0,"fMakesharect":null,"fBuyct":0,"fCommentct":4,"fSourceurl":null,"fCountryname":"美国","fFilmtypename":"喜剧/爱情/剧情","fImpression":"印象"},{"fId":"594cacc75bc42d07a0aa541b","fName":"正义","fFilmtype":"1100000000000000000","fYear":2016,"fCountry":4,"fKeyword":"正义","fPhoto":"http://119.10.70.142:9080/Images/upload/videoPhoto/595a87a137ca1d108069af14.png","fPhotow":"http://101.201.122.79:8083/Images/upload/videoPhoto/596adc9d74c36b070e69ec8d.jpg","fDirector":"Richard Gabai","fPerformer":" Stephen Lang, Jackson Rathbone, Jamie-Lynn Sigler ","fShowtime":"2016-12-12","fScore":0.0,"fPricetagid":"0","fPricetagname":"免费电影","fIntime":"2017-06-23 14:24:45","fShow":1,"fLookct":0,"fMakelookct":11,"fGoodct":0,"fMakegoodct":12,"fCollect":0,"fMakecollect":13,"fPlayct":4,"fMakepalyct":15,"fSharect":0,"fMakesharect":null,"fBuyct":0,"fCommentct":0,"fSourceurl":null,"fCountryname":"美国","fFilmtypename":"喜剧/爱情","fImpression":"印象"}]},"allcount":0}
                    var videoList = data.result;
                    if (videoList && videoList.length > 0) {
                        var _html = '';
                        $.each(videoList, function (index, item) {
                            _html += '  <li class="flex sp_1"  onclick="GoToVideoInfo(\'' + item.fId + '\')" id="brand_cat" searchtype="brand"><a href="#">' +
                                ' <div       class="movieImg2">' +
                                ' <img src="' + item.fPhoto + '"alt="" style="width: 100%" />' +
                                '  <span class="movieName">' + item.fName +
                                '    </span>' +
                                ' <span class="movieExplain font_12">' + item.fKeyword + '</span>' +
                                '  </div>' +
                                '  </a></li>';
                        });
                        $('#category-head').append(_html);

                    }

                }
            }
        });
    }

    var filmObject = {
        pno: 1,
        pagesize: 5,
        allcount: -1
    }
    function LoadComment() {
        $('#div_commentfoot').html('');
        var filmId = '${film.fId?string}';
        $.ajax({
            type: 'get',
            url: '/api/comment/getcommentlist?classtype=1&objectid=' + filmId +
            '&parentid=0&pno=' + filmObject.pno + '&pagesize=' + filmObject.pagesize + '&allcount=' + filmObject.allcount,
            dataType: 'json',
            success: function (data) {
                if (mortise_layout.ValidataResult(data)) {
                    //{"code":"OperateOk","errorMsg":"","result":{"list":[{"fId":"594cabc05bc42d07a0aa541a","fName":"一个钓鱼的故事","fFilmtype":"1000010100000000000","fYear":2016,"fCountry":12,"fKeyword":"一个钓鱼的故事","fPhoto":"http://119.10.70.142:9080/Images/upload/videoPhoto/595a87fe37ca1d108069af15.png","fPhotow":"http://101.201.122.79:8083/Images/upload/videoPhoto/596adca774c36b070e69ec8e.jpg","fDirector":"Matt Birman","fPerformer":"Eddie McClintock, Jayne Heitmeyer, Jordyn Negri ","fShowtime":"2016-12-12","fScore":0.0,"fPricetagid":"0","fPricetagname":"免费电影","fIntime":"2017-06-23 14:20:23","fShow":1,"fLookct":0,"fMakelookct":11,"fGoodct":0,"fMakegoodct":12,"fCollect":2,"fMakecollect":13,"fPlayct":132,"fMakepalyct":15,"fSharect":0,"fMakesharect":null,"fBuyct":0,"fCommentct":22,"fSourceurl":null,"fCountryname":"加拿大","fFilmtypename":"喜剧/剧情/奇幻","fImpression":"印象"},{"fId":"5930e4cd1c886e2dc0d45342","fName":"末世迷踪：下一代","fFilmtype":"0000000100000000000","fYear":2016,"fCountry":4,"fKeyword":"末世迷踪：下一代","fPhoto":"http://119.10.70.142:9080/Images/upload/videoPhoto/595a88f137ca1d108069af17.png","fPhotow":"http://101.201.122.79:8083/Images/upload/videoPhoto/596adcc774c36b070e69ec90.jpg","fDirector":"Larry A. McLean","fPerformer":" Amber Frank, Mason Dye, Dylan Sprayberry","fShowtime":"2017-06-02","fScore":0.0,"fPricetagid":"0","fPricetagname":"免费电影","fIntime":"2017-06-02 12:08:34","fShow":1,"fLookct":1,"fMakelookct":15,"fGoodct":2,"fMakegoodct":25,"fCollect":2,"fMakecollect":0,"fPlayct":17,"fMakepalyct":5,"fSharect":1,"fMakesharect":null,"fBuyct":0,"fCommentct":4,"fSourceurl":null,"fCountryname":"美国","fFilmtypename":"奇幻","fImpression":null},{"fId":"594c95065bc42d07a03f1fac","fName":"大婴儿","fFilmtype":"1100010000000000000","fYear":2015,"fCountry":4,"fKeyword":"大婴儿","fPhoto":"http://119.10.70.142:9080/Images/upload/videoPhoto/595a887337ca1d108069af16.png","fPhotow":"http://101.201.122.79:8083/Images/upload/videoPhoto/596adcb874c36b070e69ec8f.jpg","fDirector":"Stephen Langford","fPerformer":"Maureen McCormick, Andrew Lawrence, Ken Davitian","fShowtime":"2015-12-12","fScore":0.0,"fPricetagid":"1","fPricetagname":"2元电影","fIntime":"2017-06-23 12:43:35","fShow":1,"fLookct":0,"fMakelookct":11,"fGoodct":0,"fMakegoodct":12,"fCollect":1,"fMakecollect":13,"fPlayct":11,"fMakepalyct":15,"fSharect":0,"fMakesharect":null,"fBuyct":0,"fCommentct":4,"fSourceurl":null,"fCountryname":"美国","fFilmtypename":"喜剧/爱情/剧情","fImpression":"印象"},{"fId":"594cacc75bc42d07a0aa541b","fName":"正义","fFilmtype":"1100000000000000000","fYear":2016,"fCountry":4,"fKeyword":"正义","fPhoto":"http://119.10.70.142:9080/Images/upload/videoPhoto/595a87a137ca1d108069af14.png","fPhotow":"http://101.201.122.79:8083/Images/upload/videoPhoto/596adc9d74c36b070e69ec8d.jpg","fDirector":"Richard Gabai","fPerformer":" Stephen Lang, Jackson Rathbone, Jamie-Lynn Sigler ","fShowtime":"2016-12-12","fScore":0.0,"fPricetagid":"0","fPricetagname":"免费电影","fIntime":"2017-06-23 14:24:45","fShow":1,"fLookct":0,"fMakelookct":11,"fGoodct":0,"fMakegoodct":12,"fCollect":0,"fMakecollect":13,"fPlayct":4,"fMakepalyct":15,"fSharect":0,"fMakesharect":null,"fBuyct":0,"fCommentct":0,"fSourceurl":null,"fCountryname":"美国","fFilmtypename":"喜剧/爱情","fImpression":"印象"}]},"allcount":0}
                    var videoList = data.result.list;
                    var dataCount=data.result.count;
                    $('#sp_commentct').html(dataCount);
                    if (videoList && videoList.length > 0) {

                        var _html = '';
                        $.each(videoList, function (index, item) {
                            _html += '  <li>' +
                                '<div class="commentlift">' +
                                '<img src="' + item.fCommentphoto + '" >' +
                                '</div>' +

//                                '<div class="commentright">' + item.fGoodct +
//
//                                ' &nbsp;<img src="/img/good2.png" >' +
//                                ' </div>' +
                                '   <div class="commentContent">' +
                                '   <div >' + item.fCommentnick + '<br /><span class="font_12">' + item.fIntime + '</span><br /><span class="commenttest" >' +
                                '&nbsp;' + item.fContent + '<br /></span>' +
                                '</div>' +
                                '</div>' +
                                '</li>';

                        });
                        if(filmObject.pno==1){
                            $('#ul_comment').html(_html);
                        }
                        else{
                            $('#ul_comment').append(_html);
                        }


                        if (dataCount>( filmObject.pno)* filmObject.pagesize){
                            $('#div_commentfoot').html('<span style="cursor:pointer" onclick="loadMore()">查看更多...</span>');
                        }
                        else{
                            //over
                            $('#div_commentfoot').html('<span style="cursor:pointer" >没有数据了...</span>');
                        }
                    }
                    else{
                        $('#ul_comment').html('没有评论快来添加吧！');
                    }

                }
            }
        });
    }
    $(function(){
        // 按钮操作


        // dropload
     $('.inner').dropload({
         scrollArea :  $('.inner'),
         loadDownFn : function(me){
                var filmId = '${film.fId?string}';
                $.ajax({
                    type: 'get',
                    url: '/api/comment/getcommentlist?classtype=1&objectid=' + filmId +
                    '&parentid=0&pno=' + filmObject.pno + '&pagesize=' + filmObject.pagesize + '&allcount=' + filmObject.allcount,
                    dataType: 'json',
                    success: function (data) {
                        if (mortise_layout.ValidataResult(data)) {
                            //{"code":"OperateOk","errorMsg":"","result":{"list":[{"fId":"594cabc05bc42d07a0aa541a","fName":"一个钓鱼的故事","fFilmtype":"1000010100000000000","fYear":2016,"fCountry":12,"fKeyword":"一个钓鱼的故事","fPhoto":"http://119.10.70.142:9080/Images/upload/videoPhoto/595a87fe37ca1d108069af15.png","fPhotow":"http://101.201.122.79:8083/Images/upload/videoPhoto/596adca774c36b070e69ec8e.jpg","fDirector":"Matt Birman","fPerformer":"Eddie McClintock, Jayne Heitmeyer, Jordyn Negri ","fShowtime":"2016-12-12","fScore":0.0,"fPricetagid":"0","fPricetagname":"免费电影","fIntime":"2017-06-23 14:20:23","fShow":1,"fLookct":0,"fMakelookct":11,"fGoodct":0,"fMakegoodct":12,"fCollect":2,"fMakecollect":13,"fPlayct":132,"fMakepalyct":15,"fSharect":0,"fMakesharect":null,"fBuyct":0,"fCommentct":22,"fSourceurl":null,"fCountryname":"加拿大","fFilmtypename":"喜剧/剧情/奇幻","fImpression":"印象"},{"fId":"5930e4cd1c886e2dc0d45342","fName":"末世迷踪：下一代","fFilmtype":"0000000100000000000","fYear":2016,"fCountry":4,"fKeyword":"末世迷踪：下一代","fPhoto":"http://119.10.70.142:9080/Images/upload/videoPhoto/595a88f137ca1d108069af17.png","fPhotow":"http://101.201.122.79:8083/Images/upload/videoPhoto/596adcc774c36b070e69ec90.jpg","fDirector":"Larry A. McLean","fPerformer":" Amber Frank, Mason Dye, Dylan Sprayberry","fShowtime":"2017-06-02","fScore":0.0,"fPricetagid":"0","fPricetagname":"免费电影","fIntime":"2017-06-02 12:08:34","fShow":1,"fLookct":1,"fMakelookct":15,"fGoodct":2,"fMakegoodct":25,"fCollect":2,"fMakecollect":0,"fPlayct":17,"fMakepalyct":5,"fSharect":1,"fMakesharect":null,"fBuyct":0,"fCommentct":4,"fSourceurl":null,"fCountryname":"美国","fFilmtypename":"奇幻","fImpression":null},{"fId":"594c95065bc42d07a03f1fac","fName":"大婴儿","fFilmtype":"1100010000000000000","fYear":2015,"fCountry":4,"fKeyword":"大婴儿","fPhoto":"http://119.10.70.142:9080/Images/upload/videoPhoto/595a887337ca1d108069af16.png","fPhotow":"http://101.201.122.79:8083/Images/upload/videoPhoto/596adcb874c36b070e69ec8f.jpg","fDirector":"Stephen Langford","fPerformer":"Maureen McCormick, Andrew Lawrence, Ken Davitian","fShowtime":"2015-12-12","fScore":0.0,"fPricetagid":"1","fPricetagname":"2元电影","fIntime":"2017-06-23 12:43:35","fShow":1,"fLookct":0,"fMakelookct":11,"fGoodct":0,"fMakegoodct":12,"fCollect":1,"fMakecollect":13,"fPlayct":11,"fMakepalyct":15,"fSharect":0,"fMakesharect":null,"fBuyct":0,"fCommentct":4,"fSourceurl":null,"fCountryname":"美国","fFilmtypename":"喜剧/爱情/剧情","fImpression":"印象"},{"fId":"594cacc75bc42d07a0aa541b","fName":"正义","fFilmtype":"1100000000000000000","fYear":2016,"fCountry":4,"fKeyword":"正义","fPhoto":"http://119.10.70.142:9080/Images/upload/videoPhoto/595a87a137ca1d108069af14.png","fPhotow":"http://101.201.122.79:8083/Images/upload/videoPhoto/596adc9d74c36b070e69ec8d.jpg","fDirector":"Richard Gabai","fPerformer":" Stephen Lang, Jackson Rathbone, Jamie-Lynn Sigler ","fShowtime":"2016-12-12","fScore":0.0,"fPricetagid":"0","fPricetagname":"免费电影","fIntime":"2017-06-23 14:24:45","fShow":1,"fLookct":0,"fMakelookct":11,"fGoodct":0,"fMakegoodct":12,"fCollect":0,"fMakecollect":13,"fPlayct":4,"fMakepalyct":15,"fSharect":0,"fMakesharect":null,"fBuyct":0,"fCommentct":0,"fSourceurl":null,"fCountryname":"美国","fFilmtypename":"喜剧/爱情","fImpression":"印象"}]},"allcount":0}
                            var videoList = data.result.list;
                            var dataCount=data.result.count;
                            $('#sp_commentct').html(dataCount);
                            if (videoList && videoList.length > 0) {

                                var _html = '';
                                $.each(videoList, function (index, item) {
                                    _html += '  <li>' +
                                        '<div class="commentlift">' +
                                        '<img src="' + item.fCommentphoto + '" >' +
                                        '</div>' +

//                                '<div class="commentright">' + item.fGoodct +
//
//                                ' &nbsp;<img src="/img/good2.png" >' +
//                                ' </div>' +
                                        '   <div class="commentContent">' +
                                        '   <div >' + item.fCommentnick + '<br /><span class="font_12">' + item.fIntime + '</span><br /><span class="commenttest" >' +
                                        '&nbsp;' + item.fContent + '<br /></span>' +
                                        '</div>' +
                                        '</div>' +
                                        '</li>';

                                });



                                if (dataCount>( filmObject.pno)* filmObject.pagesize){
                                    filmObject.pno++;
                                    $('#div_commentfoot').html('<span style="cursor:pointer" onclick="loadMore()">查看更多...</span>');
                                }
                                else{
                                    //over
                                    $('#div_commentfoot').html('<span style="cursor:pointer" >没有数据了...</span>');
                                    // 锁定
                                    me.lock();
                                    // 无数据
                                    me.noData();
                                }
                                setTimeout(function(){
                                    // 插入数据到页面，放到最后面
                                    if(filmObject.pno==1){
                                        $('#ul_comment').html(_html);
                                    }
                                    else{
                                        $('#ul_comment').append(_html);
                                    }
                                    // 每次数据插入，必须重置
                                    me.resetload();
                                },1000);
                            }
                            else{
                                $('#ul_comment').html('没有评论快来添加吧！');
                            }

                        }
                    }
                });
            }
        });
    });

    function AddConment() {
        var filmId='${film.fId}';
        var conment=$('#commentText').val();
        if (!filmId){
            alert('数据错误,视频id不存在！');
            return;
        }
        if (!commentText){
            alert('请输入评论内容！');
            return;
        }
        $.ajax({
            type: 'POST',
            url: '/api/comment/addcomment?classtype=1&objectid='+filmId+'&' +
            'parentid=0&content='+conment+'&tocommentid=0',
            dataType: 'json',
            success: function(data){
                if (mortise_layout.ValidataResult(data)) {
                    if (data.code=='OperateOk'){

                        filmObject.pno=1;
                        LoadComment();
                    }
                    else{
                        alert('操作失败！');
                    }

                }
            },
            error: function(xhr, type){
                alert('Ajax error!')
            }
        });
    }
</script>


</html>